package com.fwpsl.spring.Controller;

import com.fwpsl.spring.Service.RibbonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RibbonController {

    @Autowired
    RibbonService service;

    @RequestMapping(value = "/hystrix/welcome/{serviceId}", method = RequestMethod.GET)
    public String helloHystrix(@PathVariable String serviceId){
        //调用服务层方法
        return service.helloService(serviceId);
    }
}
